<template>
    <div>
        <pro-table :url="url" :columns="columns">
            <template slot="head" slot-scope="scoped">
                <el-image :src="scoped.row.head_pic"/>
            </template>
        </pro-table>
    </div>
</template>
<script>
import ProTable from "@/components/curd/index.vue";
export default {
    name: "User",
    components: { ProTable },
    data() {
        return {
            url: "/api/user",
            columns: [
                {
                    title: "ID",
                    key: "id",
                    placeholder: "请输入ID",
                    // showSearch: false,//是否在搜索框中显示，默认显示,不传传递为true的话，显示在搜索框中
                    // showTable: true, //表格中是否显示，默认显示，不传传递为true的话，显示在表格中
                    // showForm: false,//添加或者编辑的表单是否显示，默认显示不传传递为true的话，显示在表单（添加和编辑)中
                    // isSlot:true,// 插槽是否显示，默认不显示，如果显示请指定slot_name插槽名字  
                },{
                    title:"用户名",
                    key:"username"
                },{
                    title:"头像",
                    key:"head_pic",
                    type:"upload",
                    showSearch:false,
                    isSlot:true,
                    slot_name:"head"
                }
                ,{
                    title: "操作",
                    key: "goods_name",
                    type: "action",
                    // showForm: false,
                    isSlot: true,
                    slot_name:"do_act"
                }
            ]
        };
    },
}
</script>